﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<FacialClub.Models.ViewModels.AccessTypeViewModel>" %>

<%@ Import Namespace="FacialClub.Helpers" %>
  <%: Html.ValidationSummaryJQuery("Please fix these errors.", new Dictionary<string, object> { { "id", "valSumId" } })%>
  <% Html.EnableClientValidation(); %>
  <% using (Html.BeginForm()) {%>
  <% ViewContext.FormContext.ValidationSummaryId = "valSumId"; %>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AccessType.AccessTypeName)%>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.AccessType.AccessTypeName)%>
                <%: Html.ValidationMessageFor(model => model.AccessType.AccessTypeName,"*")%>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AccessType.IsActive)%>
            </div>
            <div class="editor-field">
            <%=Html.RadioButtonFor(model => model.AccessType.IsActive, "Yes", new { id = "IsActive_Yes"})%><label for="IsActive_Yes">Yes</label>  
            <%=Html.RadioButtonFor(model => model.AccessType.IsActive, "No", new { id = "IsActive_No" })%><label for="IsActive_No">No</label>
            <%= Html.RadioButtonFor(model => model.AccessType.IsActive, true, true)%> Yes <%= Html.RadioButtonFor(model => model.AccessType.IsActive, false, false)%> No <br />
            <%: Html.ValidationMessageFor(model => model.AccessType.IsActive, "*")%>
            </div>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

